%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for queries/resolvers/basics-object"
    Bucket0("Bucket 0 (root)<br /><br />1: <br />ᐳ: 7, 8, 20, 9<br />2: PgSelect[6]<br />3: PgSelectRows[11]<br />ᐳ: First[10], PgSelectSingle[12]"):::bucket
    Bucket1("Bucket 1 (nullableBoundary)<br />Deps: 12, 20, 2, 0, 4<br /><br />ROOT PgSelectSingleᐸusersᐳ[12]<br />1: <br />ᐳ: PgClassExpression[13]<br />2: GraphQLResolver[15]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 15, 20, 2, 0, 4<br /><br />ROOT GraphQLResolver{1}ᐸUser.usernameHashesᐳ[15]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2

    %% plan dependencies
    Object9{{"Object[9∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access7{{"Access[7∈0] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access8{{"Access[8∈0] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access7 & Access8 --> Object9
    PgSelect6[["PgSelect[6∈0] ➊<br />ᐸrandom_userᐳ"]]:::plan
    Object9 --> PgSelect6
    First10{{"First[10∈0] ➊"}}:::plan
    PgSelectRows11[["PgSelectRows[11∈0] ➊"]]:::plan
    PgSelectRows11 --> First10
    PgSelect6 --> PgSelectRows11
    PgSelectSingle12{{"PgSelectSingle[12∈0] ➊<br />ᐸusersᐳ"}}:::plan
    First10 --> PgSelectSingle12
    __Value0["__Value[0∈0] ➊<br />ᐸvariableValuesᐳ<br />Dependents: 3"]:::plan
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ<br />Dependents: 5"]:::plan
    __Value4["__Value[4∈0] ➊<br />ᐸrootValueᐳ<br />Dependents: 3"]:::plan
    GraphQLResolver15[["GraphQLResolver[15∈1] ➊<br />ᐸUser.usernameHashesᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[20]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    PgClassExpression13{{"PgClassExpression[13∈1] ➊<br />ᐸ__random_u...”username”ᐳ"}}:::plan
    PgClassExpression13 --> GraphQLResolver15
    PgSelectSingle12 --> PgClassExpression13
    GraphQLResolver17[["GraphQLResolver[17∈2] ➊<br />ᐸHashes.md5ᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[20]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    GraphQLResolver15 --> GraphQLResolver17
    GraphQLResolver19[["GraphQLResolver[19∈2] ➊<br />ᐸHashes.sha256ᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[20]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    GraphQLResolver15 --> GraphQLResolver19

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value0,__Value2,__Value4,PgSelect6,Access7,Access8,Object9,First10,PgSelectRows11,PgSelectSingle12 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgClassExpression13,GraphQLResolver15 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,GraphQLResolver17,GraphQLResolver19 bucket2

